<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes"/>
  <meta name="apple-touch-fullscreen" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no,email=no"/>
    <meta name="author" content="haibao" />
    <meta name="url" content="http://smwell.sinaapp.com/" />
    <link rel="stylesheet" href="__PUBLIC__/scan/css/style.css" />
  <title>二维码扫描效果 - by haibao</title>
</head>
<body>
  <div class="box">
    <div id="finger">
      <div id="finger_box">
        <img id="zhiwen" src="__PUBLIC__/scan/images/zhiwen.png" alt="" />
        <img id="line" src="__PUBLIC__/scan/images/line.png" alt="" />
        <p id="info"></p>
      </div>
    </div>
  </div>
  <script src="__PUBLIC__/scan/js/jquery.min.js"></script>
  <script>
    var $info=$('#info'),$zhiwen=$('#zhiwen'),$line=$('#line');
    $(function(){
      $zhiwen.click(function(){
        $info.stop().text('扫描中...');
        $line.stop().show();
        document.querySelector('#line').addEventListener('webkitAnimationEnd', function () {
                $info.text('扫描完成');
          $line.hide();
          setTimeout(function(){
            $info.text('');
            //callback
          },400);
            },false);
      });
    });
  </script>
</body>
</html>